home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / drdobbs / 1988 / 12 / ctalk.asc next >
Text File  |  1988-12-31  |  2KB  |  81 lines

  1. _C-TALK_
  2. by Ernie Tello
  3.  
  4. [EXAMPLE 1]
  5.  
  6.  
  7. Ctalk Foundation Classes = Table 1
  8. The foundation classes are listed in hierarchical format.
  9.  
  10.  
  11. Object
  12.  Assoc
  13.  Container
  14.   Buffer
  15.    Stream
  16.   ByteArray
  17.   Collection
  18.    OrdCollect
  19.     Stack
  20.   Set
  21.    Dictionary
  22.   IntArray
  23.   String
  24.  
  25.  
  26. =================================================================
  27.  
  28. Text Window Classes -- Table 2
  29. The additional classes arranged hierarchically.
  30.  
  31.  
  32. Browser
  33. File
  34. Menu
  35. Mouse
  36. Notifier
  37. ScreenMgr
  38. TxPoint
  39. Window
  40.  ButtonWin
  41.   ItemWin
  42.  Scrollbar
  43.  StdWindow
  44.   ListWindow
  45.    HorListWin
  46.   PopUp
  47.  Response
  48.  TxtWindow
  49.   TxEditor
  50. WinManager
  51.  
  52.  
  53. =================================================================
  54.  
  55.  
  56. Listing 1
  57.  
  58. initialize
  59. /* Initialize the reciever: set up MetaWindow, win_list and create root  */
  60. /* window.   */
  61. { id      newWin;
  62.   int     w, h;
  63.   extern  id  Menu;
  64.  
  65.   @ScreenMgr create_ &Screen@;
  66.   self->color = @Screen color@;
  67.   w = @Screen getXmax@;   h = @Screen getYmax@;
  68.   @Mouse create_ &Mcursor@;            /* init mouse service routine */
  69.   @Mcursor setColor_ self->color@;
  70.   @OrdCollect new_ &self->winList  size_ 25@;
  71.   @Window new_ &newWin par_  NIL  x_ 0 y_  0 wdth_ w hght_ h@;
  72.   self->rootWin = newWin;
  73.   @self->rootWin getAbsRegion_ &mbox@; /* init movement box */
  74.   /*@self->winList add_ self->rootWin@;*/
  75.   self->activeWin = self->rootWin;
  76.   Dispatcher = @Notifier create@;    /* an instance of the event manager */
  77. }
  78.  
  79. =================================================================
  80.  
  81.